﻿Imports CrystalDecisions.Shared
Imports CrystalDecisions.CrystalReports.Engine
Imports System.Data

Partial Class Default2
    Inherits System.Web.UI.Page

    Dim ocnTrabajo As New Negocio.Trabajo()

    Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click

        Dim cr As New ReportDocument

        Dim ds As New DataSet
        ds = ocnTrabajo.obtenerTrabajosAprobados(Me.FechaDesde.Text, Me.FechaHasta.Text)

        cr.Load("C:\Documents and Settings\Administrador\Mis documentos\Visual Studio 2008\Projects\TrabajoFinal\Presentacion\ListarTFAprobados.rpt")
        cr.SetDataSource(ds.Tables("TrabajoFinal"))

        cr.SetParameterValue("desde", Me.FechaDesde.Text)
        cr.SetParameterValue("hasta", Me.FechaHasta.Text)

        CrystalReportViewer1.ReportSource = cr

    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub
End Class
